from PyQt5.QtWidgets import QWidget, QVBoxLayout, QTextEdit

class ConsoleWidget(QWidget):
    def __init__(self):
        super().__init__()
        self.init_ui()

    def init_ui(self):
        layout = QVBoxLayout()
        self.text_edit = QTextEdit()
        self.text_edit.setReadOnly(True)
        layout.addWidget(self.text_edit)
        self.setLayout(layout)

    def append_data(self, data):
        self.text_edit.append(data)